/*
 * CStateCollection.cpp
 *
 *  Created on: Nov 7, 2011
 *      Author: welcome
 */

#include "CStateCollection.h"
namespace GGEngine {

CStateCollection::CStateCollection() {

}

CStateCollection::~CStateCollection() {
	int size = stateList.size();
	for (int i = 0; i < size; i++){
		CState* state = (CState*)stateList[i];
		if(state)
			delete state;
	}
}
int  CStateCollection::stateCount()
{
    return (int)stateList.size();
}
void CStateCollection::addState(CState *state)
{
	stateList.push_back(state);
}
}
